from base import Base
from selenium.webdriver.common.by import By

class Page(Base):
    def test_my(self):
        loc=(By.ID,'com.kongfz.app:id/lav_5')
        ele=self.self_ele(loc)
        return ele

    def test_name(self):
        loc = (By.ID, 'com.kongfz.app:id/et_login_name')
        ele = self.self_ele(loc)
        return ele

    def test_pwd(self):
        loc = (By.ID, 'com.kongfz.app:id/et_pwd')
        ele = self.self_ele(loc)
        return ele

    def test_pr(self):
        loc = (By.ID, 'com.kongfz.app:id/iconf_privacy')
        ele = self.self_ele(loc)
        return ele

    def test_btn(self):
        loc = (By.ID, 'com.kongfz.app:id/tv_confirm_btn')
        ele = self.self_ele(loc)
        return ele


    def sousuokuang(self):
        loc=(By.ID,'com.kongfz.app:id/ll_search')
        ele=self.self_ele(loc)
        return ele

    def test_kuang(self):
        loc = (By.XPATH, '//android.widget.EditText[@resource-id="com.kongfz.app:id/etContent"]')
        ele = self.self_ele(loc)
        return ele

    def test_annui(self):
        loc = (By.XPATH, '//android.widget.TextView[@resource-id="com.kongfz.app:id/tvSearch"]')
        ele = self.self_ele(loc)
        return ele


    #断言
    def test_shop(self):
        loc = (By.ANDROID_UIAUTOMATOR, '//android.widget.TextView[@resource-id="com.kongfz.app:id/tvGoods"]')
        ele = self.self_ele(loc)
        return ele

    def test_book(self):
        loc = (By.XPATH, '//android.widget.TextView[@resource-id="com.kongfz.app:id/tvItem"]')
        ele = self.self_ele(loc)
        return ele

    def test_buy(self):
        loc = (By.XPATH, '//android.widget.TextView[@resource-id="com.kongfz.app:id/tvAuction"]')
        ele = self.self_ele(loc)
        return ele